Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old generated public APIs #6376

Open
wants to merge 4 commits into
base: andrew/remove-snapshot-generation
Choose a base branch
from

Conversation

andrewlock
Copy link
Member

@andrewlock andrewlock commented Nov 29, 2024

Summary of changes

Delete the Public API Generator

Reason for change

We added this generator to reduce the amount of boilerplate you need to write to correctly record telemetry for public APIs. However, with the move to Datadog.Trace.Manual, these APIs are completely unused, so we may as well remove the complexity and duplication.

Implementation details

  • Delete the [GeneratePublicApi] generator
    • Keeping the [PublicApi] attribute for now - that will be cleared up in a separate PR
  • Rename the previously-decorated properties that were called SomePropInternal to SomeProp
    • We still have some "leftover" Internal suffixes, will tidy those up separately
  • Main changes are in TracerSettings, ExporterSettings, IntegrationSettings + their immutable counterparts

Test coverage

Covered by existing tests

Other details

I noticed that there were some properties that we were getting public API telemetry for which we kind of lost in the move to Datadog.Trace.Manual: SpanContext.Parent, SpanContext.ParentId, SpanContext.ServiceName. I don't think that actually matters, as these can't actually be accessed any more for technical reasons...

Part of stack

@andrewlock andrewlock added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:cleanup Minor code clean up area:telemetry labels Nov 29, 2024
@andrewlock andrewlock requested review from a team as code owners November 29, 2024 14:08
@andrewlock
Copy link
Member Author

andrewlock commented Nov 29, 2024

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6376) - mean (69ms)  : 66, 72
     .   : milestone, 69,
    master - mean (69ms)  : 66, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6376) - mean (973ms)  : 949, 997
     .   : milestone, 973,
    master - mean (977ms)  : 953, 1000
     .   : milestone, 977,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6376) - mean (108ms)  : 105, 110
     .   : milestone, 108,
    master - mean (107ms)  : 105, 110
     .   : milestone, 107,

    section CallTarget+Inlining+NGEN
    This PR (6376) - mean (677ms)  : 661, 692
     .   : milestone, 677,
    master - mean (680ms)  : 664, 695
     .   : milestone, 680,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6376) - mean (91ms)  : 89, 93
     .   : milestone, 91,
    master - mean (91ms)  : 89, 93
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (6376) - mean (623ms)  : 608, 637
     .   : milestone, 623,
    master - mean (631ms)  : 618, 645
     .   : milestone, 631,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6376) - mean (190ms)  : 186, 194
     .   : milestone, 190,
    master - mean (191ms)  : 186, 196
     .   : milestone, 191,

    section CallTarget+Inlining+NGEN
    This PR (6376) - mean (1,086ms)  : 1057, 1114
     .   : milestone, 1086,
    master - mean (1,090ms)  : 1061, 1118
     .   : milestone, 1090,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6376) - mean (276ms)  : 271, 281
     .   : milestone, 276,
    master - mean (277ms)  : 273, 281
     .   : milestone, 277,

    section CallTarget+Inlining+NGEN
    This PR (6376) - mean (872ms)  : 847, 896
     .   : milestone, 872,
    master - mean (874ms)  : 851, 897
     .   : milestone, 874,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6376) - mean (266ms)  : 261, 271
     .   : milestone, 266,
    master - mean (266ms)  : 263, 269
     .   : milestone, 266,

    section CallTarget+Inlining+NGEN
    This PR (6376) - mean (839ms)  : 808, 870
     .   : milestone, 839,
    master - mean (850ms)  : 817, 883
     .   : milestone, 850,

Loading

@andrewlock
Copy link
Member Author

andrewlock commented Nov 29, 2024

Benchmarks Report for appsec 🐌

Benchmarks for #6376 compared to master:

  • All benchmarks have the same speed
  • 6 benchmarks have fewer allocations
  • 3 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #6376

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472 213.72 KB 212.29 KB -1.43 KB -0.67%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 210.2 KB 208.77 KB -1.43 KB -0.68%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1 187.82 KB 186.42 KB -1.41 KB -0.75%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 184.41 KB 183 KB -1.41 KB -0.76%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0 180.47 KB 179.06 KB -1.41 KB -0.78%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0 176.97 KB 175.56 KB -1.41 KB -0.80%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 196μs 108ns 403ns 2.43 0.0972 0 176.97 KB
master AllCycleSimpleBody netcoreapp3.1 299μs 126ns 473ns 2.55 0 0 184.41 KB
master AllCycleSimpleBody net472 261μs 323ns 1.25μs 33.3 2.53 0 210.2 KB
master AllCycleMoreComplexBody net6.0 202μs 120ns 464ns 2.52 0.101 0 180.47 KB
master AllCycleMoreComplexBody netcoreapp3.1 301μs 129ns 499ns 2.59 0 0 187.82 KB
master AllCycleMoreComplexBody net472 274μs 250ns 968ns 33.9 2.46 0 213.72 KB
master ObjectExtractorSimpleBody net6.0 139ns 0.154ns 0.576ns 0.00391 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 202ns 0.176ns 0.68ns 0.00374 0 0 272 B
master ObjectExtractorSimpleBody net472 211ns 0.15ns 0.561ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 2.99μs 5.62ns 21.8ns 0.0525 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 4.05μs 2.92ns 11.3ns 0.0505 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 4.44μs 4.07ns 14.1ns 0.601 0.00668 0 3.8 KB
#6376 AllCycleSimpleBody net6.0 212μs 128ns 478ns 2.45 0 0 175.56 KB
#6376 AllCycleSimpleBody netcoreapp3.1 318μs 209ns 808ns 2.41 0 0 183 KB
#6376 AllCycleSimpleBody net472 278μs 267ns 961ns 33.1 2.49 0 208.77 KB
#6376 AllCycleMoreComplexBody net6.0 218μs 56.2ns 203ns 2.5 0 0 179.06 KB
#6376 AllCycleMoreComplexBody netcoreapp3.1 324μs 118ns 427ns 2.46 0 0 186.42 KB
#6376 AllCycleMoreComplexBody net472 293μs 367ns 1.37μs 33.7 2.44 0 212.29 KB
#6376 ObjectExtractorSimpleBody net6.0 144ns 0.145ns 0.541ns 0.00393 0 0 280 B
#6376 ObjectExtractorSimpleBody netcoreapp3.1 219ns 0.142ns 0.55ns 0.00366 0 0 272 B
#6376 ObjectExtractorSimpleBody net472 216ns 0.127ns 0.494ns 0.0446 0 0 281 B
#6376 ObjectExtractorMoreComplexBody net6.0 3.04μs 1.78ns 6.88ns 0.0533 0 0 3.78 KB
#6376 ObjectExtractorMoreComplexBody netcoreapp3.1 4μs 2.96ns 11.4ns 0.0499 0 0 3.69 KB
#6376 ObjectExtractorMoreComplexBody net472 4.36μs 3.1ns 12ns 0.602 0.00657 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 37.6μs 16.7ns 60.3ns 0.452 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.3μs 26.5ns 103ns 0.433 0 0 32.4 KB
master EncodeArgs net472 66.5μs 34ns 127ns 5.14 0.0676 0 32.5 KB
master EncodeLegacyArgs net6.0 76.9μs 24.6ns 88.8ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 106μs 416ns 1.61μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 157μs 140ns 543ns 0.315 0 0 2.15 KB
#6376 EncodeArgs net6.0 38.2μs 25.4ns 94.9ns 0.443 0 0 32.4 KB
#6376 EncodeArgs netcoreapp3.1 54.1μs 26.2ns 98.1ns 0.431 0 0 32.4 KB
#6376 EncodeArgs net472 66.8μs 52ns 201ns 5.16 0.067 0 32.5 KB
#6376 EncodeLegacyArgs net6.0 69.6μs 35.2ns 136ns 0 0 0 2.14 KB
#6376 EncodeLegacyArgs netcoreapp3.1 107μs 233ns 903ns 0 0 0 2.14 KB
#6376 EncodeLegacyArgs net472 155μs 121ns 470ns 0.31 0 0 2.15 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 181μs 43.6ns 169ns 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 195μs 387ns 1.5μs 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 209μs 89.6ns 335ns 0.314 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 121μs 34.7ns 135ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 130μs 222ns 833ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 139μs 56.6ns 212ns 0.209 0 0 1.49 KB
#6376 RunWafRealisticBenchmark net6.0 181μs 47.8ns 179ns 0 0 0 2.44 KB
#6376 RunWafRealisticBenchmark netcoreapp3.1 195μs 139ns 522ns 0 0 0 2.39 KB
#6376 RunWafRealisticBenchmark net472 210μs 111ns 429ns 0.313 0 0 2.46 KB
#6376 RunWafRealisticBenchmarkWithAttack net6.0 123μs 164ns 636ns 0 0 0 1.47 KB
#6376 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 133μs 236ns 913ns 0 0 0 1.46 KB
#6376 RunWafRealisticBenchmarkWithAttack net472 139μs 49.6ns 192ns 0.209 0 0 1.49 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6376

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 255.15 KB 265.87 KB 10.72 KB 4.20%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 252.77 KB 262.47 KB 9.7 KB 3.84%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 59.39 KB 60.86 KB 1.46 KB 2.46%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 59.8μs 774ns 7.67μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 60.8μs 675ns 6.65μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.4μs 91.1ns 316ns 0 0 0 59.39 KB
master StringConcatAspectBenchmark net6.0 312μs 1.8μs 13.7μs 0 0 0 255.15 KB
master StringConcatAspectBenchmark netcoreapp3.1 308μs 5.92μs 57.3μs 0 0 0 252.77 KB
master StringConcatAspectBenchmark net472 292μs 6.82μs 65.4μs 0 0 0 278.53 KB
#6376 StringConcatBenchmark net6.0 52.6μs 119ns 461ns 0 0 0 43.44 KB
#6376 StringConcatBenchmark netcoreapp3.1 61μs 718ns 7.08μs 0 0 0 42.64 KB
#6376 StringConcatBenchmark net472 37.4μs 115ns 415ns 0 0 0 60.86 KB
#6376 StringConcatAspectBenchmark net6.0 318μs 6.26μs 61.9μs 0 0 0 265.87 KB
#6376 StringConcatAspectBenchmark netcoreapp3.1 342μs 1.89μs 13.2μs 0 0 0 262.47 KB
#6376 StringConcatAspectBenchmark net472 275μs 4.52μs 42.9μs 0 0 0 278.53 KB

Had to move the PublicApiAttribute into the project properly, but will be removed at a later point
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 29, 2024

Datadog Report

Branch report: andrew/remove-old-public-apis
Commit report: e9f3ed1
Test service: dd-trace-dotnet

✅ 0 Failed, 457884 Passed, 3553 Skipped, 32h 58m 6.41s Total Time

@andrewlock
Copy link
Member Author

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6376) (11.224M)   : 0, 11224215
    master (10.950M)   : 0, 10950268
    benchmarks/2.9.0 (11.033M)   : 0, 11032866

    section Automatic
    This PR (6376) (7.206M)   : 0, 7205844
    master (7.144M)   : 0, 7144062
    benchmarks/2.9.0 (7.786M)   : 0, 7785853

    section Trace stats
    master (7.592M)   : 0, 7592116

    section Manual
    master (11.151M)   : 0, 11151368

    section Manual + Automatic
    This PR (6376) (6.651M)   : 0, 6650706
    master (6.721M)   : 0, 6721227

    section DD_TRACE_ENABLED=0
    master (10.133M)   : 0, 10132646

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6376) (9.652M)   : 0, 9652096
    master (9.581M)   : 0, 9581060
    benchmarks/2.9.0 (9.495M)   : 0, 9494821

    section Automatic
    This PR (6376) (6.506M)   : 0, 6506149
    master (6.411M)   : 0, 6411077

    section Trace stats
    master (6.557M)   : 0, 6557433

    section Manual
    master (9.539M)   : 0, 9539314

    section Manual + Automatic
    This PR (6376) (5.835M)   : 0, 5835149
    master (5.854M)   : 0, 5854294

    section DD_TRACE_ENABLED=0
    master (8.891M)   : 0, 8890821

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6376) (10.028M)   : 0, 10028201
    master (10.194M)   : 0, 10193580
    benchmarks/2.9.0 (10.020M)   : 0, 10019592

    section Automatic
    This PR (6376) (6.501M)   : 0, 6501452
    master (6.769M)   : 0, 6768819
    benchmarks/2.9.0 (7.255M)   : 0, 7255257

    section Trace stats
    master (7.357M)   : 0, 7356753

    section Manual
    master (10.447M)   : 0, 10447376

    section Manual + Automatic
    This PR (6376) (5.956M)   : 0, 5956405
    master (5.985M)   : 0, 5985300

    section DD_TRACE_ENABLED=0
    master (9.475M)   : 0, 9475300

Loading

@andrewlock
Copy link
Member Author

Benchmarks Report for tracer 🐌

Benchmarks for #6376 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.186
  • 1 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.04μs 43ns 243ns 0.0157 0.00786 0 5.62 KB
master StartStopWithChild netcoreapp3.1 10.1μs 54.3ns 321ns 0.02 0.01 0 5.8 KB
master StartStopWithChild net472 16.1μs 63.7ns 247ns 1.04 0.301 0.095 6.21 KB
#6376 StartStopWithChild net6.0 7.88μs 43.9ns 281ns 0.0198 0.0119 0.00396 5.6 KB
#6376 StartStopWithChild netcoreapp3.1 9.99μs 52.9ns 275ns 0.0148 0.00495 0 5.81 KB
#6376 StartStopWithChild net472 16.3μs 40.4ns 156ns 1.03 0.299 0.0808 6.21 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 493μs 410ns 1.54μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 659μs 433ns 1.68μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 838μs 743ns 2.78μs 0.419 0 0 3.3 KB
#6376 WriteAndFlushEnrichedTraces net6.0 499μs 143ns 515ns 0 0 0 2.7 KB
#6376 WriteAndFlushEnrichedTraces netcoreapp3.1 650μs 404ns 1.51μs 0 0 0 2.7 KB
#6376 WriteAndFlushEnrichedTraces net472 859μs 533ns 1.99μs 0.428 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 150μs 840ns 7.18μs 0.145 0 0 14.47 KB
master SendRequest netcoreapp3.1 170μs 1.13μs 11μs 0.166 0 0 17.27 KB
master SendRequest net472 0.000524ns 0.000306ns 0.0011ns 0 0 0 0 b
#6376 SendRequest net6.0 146μs 835ns 6.57μs 0.14 0 0 14.47 KB
#6376 SendRequest netcoreapp3.1 173μs 1.15μs 11.3μs 0.17 0 0 17.27 KB
#6376 SendRequest net472 0.00199ns 0.000681ns 0.00255ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6376

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.58 KB 41.81 KB 232 B 0.56%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 553μs 2.52μs 9.08μs 0.619 0 0 41.58 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 698μs 3.81μs 21.6μs 0.334 0 0 41.78 KB
master WriteAndFlushEnrichedTraces net472 881μs 3.68μs 14.2μs 8.04 2.23 0.446 53.28 KB
#6376 WriteAndFlushEnrichedTraces net6.0 568μs 3.05μs 16.7μs 0.576 0 0 41.81 KB
#6376 WriteAndFlushEnrichedTraces netcoreapp3.1 702μs 3.91μs 23.8μs 0.351 0 0 41.71 KB
#6376 WriteAndFlushEnrichedTraces net472 851μs 3.18μs 11.9μs 8.33 2.5 0.417 53.29 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.35μs 1.19ns 4.62ns 0.0142 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.76μs 1.74ns 6.75ns 0.0132 0 0 1.02 KB
master ExecuteNonQuery net472 2.09μs 1.85ns 6.92ns 0.156 0.00105 0 987 B
#6376 ExecuteNonQuery net6.0 1.22μs 1.04ns 3.89ns 0.014 0 0 1.02 KB
#6376 ExecuteNonQuery netcoreapp3.1 1.75μs 2.4ns 9.31ns 0.013 0 0 1.02 KB
#6376 ExecuteNonQuery net472 2.02μs 1.89ns 7.31ns 0.156 0.00102 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.29μs 0.467ns 1.75ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.51μs 0.775ns 3ns 0.0129 0 0 976 B
master CallElasticsearch net472 2.64μs 1.25ns 4.66ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.22μs 0.407ns 1.52ns 0.0135 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.66μs 1.04ns 3.75ns 0.0133 0 0 1.02 KB
master CallElasticsearchAsync net472 2.59μs 0.94ns 3.64ns 0.167 0 0 1.05 KB
#6376 CallElasticsearch net6.0 1.3μs 0.304ns 1.1ns 0.0138 0 0 976 B
#6376 CallElasticsearch netcoreapp3.1 1.58μs 0.616ns 2.39ns 0.0127 0 0 976 B
#6376 CallElasticsearch net472 2.51μs 1.51ns 5.65ns 0.157 0 0 995 B
#6376 CallElasticsearchAsync net6.0 1.28μs 0.5ns 1.94ns 0.0134 0 0 952 B
#6376 CallElasticsearchAsync netcoreapp3.1 1.64μs 0.574ns 2.22ns 0.0139 0 0 1.02 KB
#6376 CallElasticsearchAsync net472 2.69μs 1.65ns 6.39ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.28μs 0.567ns 2.12ns 0.0135 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.58μs 0.498ns 1.86ns 0.0127 0 0 952 B
master ExecuteAsync net472 1.87μs 0.608ns 2.27ns 0.145 0 0 915 B
#6376 ExecuteAsync net6.0 1.22μs 0.558ns 2.09ns 0.0134 0 0 952 B
#6376 ExecuteAsync netcoreapp3.1 1.65μs 0.773ns 2.89ns 0.0124 0 0 952 B
#6376 ExecuteAsync net472 1.86μs 0.699ns 2.62ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.4μs 1.78ns 6.64ns 0.0308 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.36μs 1.98ns 7.68ns 0.0375 0 0 2.85 KB
master SendAsync net472 7.45μs 1.31ns 4.55ns 0.495 0 0 3.12 KB
#6376 SendAsync net6.0 4.34μs 0.738ns 2.56ns 0.0326 0 0 2.31 KB
#6376 SendAsync netcoreapp3.1 5.4μs 3.01ns 11.6ns 0.0377 0 0 2.85 KB
#6376 SendAsync net472 7.26μs 1.68ns 6.51ns 0.494 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.43μs 0.881ns 3.41ns 0.0229 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.25μs 0.832ns 3ns 0.0216 0 0 1.64 KB
master EnrichedLog net472 2.64μs 1.27ns 4.74ns 0.25 0 0 1.57 KB
#6376 EnrichedLog net6.0 1.58μs 0.566ns 2.04ns 0.023 0 0 1.64 KB
#6376 EnrichedLog netcoreapp3.1 2.2μs 1.81ns 6.78ns 0.022 0 0 1.64 KB
#6376 EnrichedLog net472 2.51μs 0.953ns 3.69ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 119μs 121ns 467ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 124μs 114ns 428ns 0 0 0 4.28 KB
master EnrichedLog net472 152μs 81ns 314ns 0.682 0.227 0 4.46 KB
#6376 EnrichedLog net6.0 121μs 94.5ns 366ns 0.0607 0 0 4.28 KB
#6376 EnrichedLog netcoreapp3.1 125μs 222ns 861ns 0 0 0 4.28 KB
#6376 EnrichedLog net472 153μs 113ns 438ns 0.691 0.23 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.23μs 1.16ns 4.51ns 0.0305 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.33μs 1ns 3.75ns 0.0281 0 0 2.2 KB
master EnrichedLog net472 4.73μs 2.09ns 8.11ns 0.321 0 0 2.02 KB
#6376 EnrichedLog net6.0 2.91μs 1.24ns 4.82ns 0.0304 0 0 2.2 KB
#6376 EnrichedLog netcoreapp3.1 4.14μs 1.81ns 7.01ns 0.0288 0 0 2.2 KB
#6376 EnrichedLog net472 4.85μs 1.23ns 4.77ns 0.319 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.33μs 0.624ns 2.33ns 0.016 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.89μs 1.07ns 4.14ns 0.0151 0 0 1.14 KB
master SendReceive net472 2.08μs 3.84ns 14.4ns 0.183 0 0 1.16 KB
#6376 SendReceive net6.0 1.36μs 1.08ns 4.05ns 0.0164 0 0 1.14 KB
#6376 SendReceive netcoreapp3.1 1.82μs 3.5ns 13.6ns 0.0155 0 0 1.14 KB
#6376 SendReceive net472 2.05μs 4.6ns 17.8ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.71μs 1.12ns 4.35ns 0.0217 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.93μs 1.28ns 4.81ns 0.0215 0 0 1.65 KB
master EnrichedLog net472 4.3μs 1.55ns 5.6ns 0.324 0 0 2.04 KB
#6376 EnrichedLog net6.0 2.82μs 3.53ns 13.7ns 0.0213 0 0 1.6 KB
#6376 EnrichedLog netcoreapp3.1 3.7μs 2.01ns 7.78ns 0.0222 0 0 1.65 KB
#6376 EnrichedLog net472 4.43μs 1.36ns 5.08ns 0.324 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6376

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.171 669.26 571.53

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 397ns 0.409ns 1.58ns 0.00817 0 0 576 B
master StartFinishSpan netcoreapp3.1 590ns 0.889ns 3.44ns 0.00772 0 0 576 B
master StartFinishSpan net472 670ns 1.85ns 7.18ns 0.0917 0 0 578 B
master StartFinishScope net6.0 484ns 0.839ns 3.25ns 0.00982 0 0 696 B
master StartFinishScope netcoreapp3.1 673ns 1.44ns 5.59ns 0.00945 0 0 696 B
master StartFinishScope net472 864ns 2.77ns 10.7ns 0.105 0 0 658 B
#6376 StartFinishSpan net6.0 428ns 0.885ns 3.43ns 0.008 0 0 576 B
#6376 StartFinishSpan netcoreapp3.1 585ns 1.54ns 5.95ns 0.00778 0 0 576 B
#6376 StartFinishSpan net472 571ns 1.04ns 4.03ns 0.0916 0 0 578 B
#6376 StartFinishScope net6.0 483ns 0.95ns 3.68ns 0.0098 0 0 696 B
#6376 StartFinishScope netcoreapp3.1 721ns 1.33ns 5.16ns 0.00968 0 0 696 B
#6376 StartFinishScope net472 881ns 1.79ns 6.93ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6376

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.202 736.76 613.08

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 737ns 1.03ns 4ns 0.00966 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 990ns 1.28ns 4.96ns 0.0097 0 0 696 B
master RunOnMethodBegin net472 1.14μs 2.38ns 9.21ns 0.104 0 0 658 B
#6376 RunOnMethodBegin net6.0 613ns 0.345ns 1.29ns 0.00981 0 0 696 B
#6376 RunOnMethodBegin netcoreapp3.1 909ns 1.2ns 4.65ns 0.00969 0 0 696 B
#6376 RunOnMethodBegin net472 1.1μs 1.37ns 5.31ns 0.104 0 0 658 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:telemetry area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:cleanup Minor code clean up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants